package com.lai.note.service;

import com.lai.note.dto.UserDto;
import com.lai.note.exception.*;
import com.lai.note.model.User;

public interface UserBaseService {
    User userRegister(String phone, String password,Double lng,Double lat) throws UserExistException;

    User updateUser(UserDto userDto) throws DataUpdateFailureException, UserNotExistException;

    User userLoginByPwd(String phone,String pwd) throws NoPassIdentityException,UserNotExistException;

    User userLoginByCode(String phone,String code) throws UserNotExistException, IdentifyingCodeException;

    User findUserById(String userId);

    boolean updateUserLoginPwdByOldPwd(String userId,String oldPwd,String newPwd) throws NoPassIdentityException;

    boolean updateUserLoginPwdByCode(String phone,String code,String newPwd) throws IdentifyingCodeException;
}
